package org.langqiao.controlflow;

import java.util.Scanner;


/**
 * @author dell
 *
 */
public class TestScanner {
	
	public static void test01(){
		Scanner s = new Scanner(System.in);
		String str = s.next();  
		System.out.println("输入的字符窜为："+str); 
	}
	
	public static void test02(){
		Scanner s = new Scanner(System.in);
		System.out.println("请输入一个加数"); 
		int a = s.nextInt();
		System.out.println("请输入一个加数 ");
		int b = s.nextInt();
		int sum =a+b;
		System.out.println("加数之和为："+sum); 
	}
	
	
	public static void main(String[] args) {
		test02();
	}
}
